package com.zyd.blog.business.dto.wechat;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class ArticleResponse {
    @JsonProperty("item")
    private List<ItemDTO> item;
    @JsonProperty("total_count")
    private Long totalCount;
    @JsonProperty("item_count")
    private Long itemCount;

    @NoArgsConstructor
    @Data
    public static class ItemDTO {
        @JsonProperty("article_id")
        private String articleId;
        @JsonProperty("content")
        private ContentDTO content;
        @JsonProperty("update_time")
        private Long updateTime;

        @NoArgsConstructor
        @Data
        public static class ContentDTO {
            @JsonProperty("news_item")
            private List<NewsItemDTO> newsItem;
            @JsonProperty("create_time")
            private Long createTime;
            @JsonProperty("update_time")
            private Long updateTime;

            @NoArgsConstructor
            @Data
            public static class NewsItemDTO {
                @JsonProperty("title")
                private String title;
                @JsonProperty("author")
                private String author;
                @JsonProperty("digest")
                private String digest;
                @JsonProperty("content")
                private String content;
                @JsonProperty("content_source_url")
                private String contentSourceUrl;
                @JsonProperty("thumb_media_id")
                private String thumbMediaId;
                @JsonProperty("show_cover_pic")
                private Long showCoverPic;
                @JsonProperty("url")
                private String url;
                @JsonProperty("thumb_url")
                private String thumbUrl;
                @JsonProperty("need_open_comment")
                private Long needOpenComment;
                @JsonProperty("only_fans_can_comment")
                private Long onlyFansCanComment;
                @JsonProperty("is_deleted")
                private Boolean isDeleted;
            }
        }
    }
}
